import { PluginType, PaginationType } from "entities/Action";
import {
  DataTree,
  EvaluationSubstitutionType,
  DataTreeWidget,
  DataTreeAppsmith,
  ENTITY_TYPE,
} from "entities/DataTree/dataTreeFactory";

export const unEvalTree = {
  MainContainer: {
    widgetName: "MainContainer",
    backgroundColor: "none",
    rightColumn: 2220,
    snapColumns: 64,
    detachFromLayout: true,
    widgetId: "0",
    topRow: 0,
    bottomRow: 640,
    containerStyle: "none",
    snapRows: 113,
    parentRowSpace: 1,
    type: "CANVAS_WIDGET",
    canExtend: true,
    version: 52,
    minHeight: 620,
    parentColumnSpace: 1,
    dynamicBindingPathList: [],
    leftColumn: 0,
    children: ["j9dpft2lpu", "l0yem4eh6l"],
    defaultProps: {},
    defaultMetaProps: [],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    reactivePaths: {},
    triggerPaths: {},
    validationPaths: {},
    ENTITY_TYPE: ENTITY_TYPE.WIDGET,
    privateWidgets: {},
  },
  Button1: {
    widgetName: "Button1",
    buttonColor: "#03B365",
    displayName: "Button",
    iconSVG: "/static/media/icon.cca02633.svg",
    topRow: 15,
    bottomRow: 19,
    parentRowSpace: 10,
    type: "BUTTON_WIDGET",
    hideCard: false,
    animateLoading: true,
    parentColumnSpace: 26.421875,
    dynamicTriggerPathList: [],
    leftColumn: 20,
    dynamicBindingPathList: [],
    text: "button1",
    isDisabled: false,
    key: "r6h8y6dc8i",
    rightColumn: 36,
    isDefaultClickDisabled: true,
    widgetId: "j9dpft2lpu",
    isVisible: true,
    recaptchaType: "V3",
    version: 1,
    parentId: "0",
    renderMode: "CANVAS",
    isLoading: false,
    buttonVariant: "PRIMARY",
    placement: "CENTER",
    defaultProps: {},
    defaultMetaProps: ["recaptchaToken"],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    reactivePaths: {
      recaptchaToken: EvaluationSubstitutionType.TEMPLATE,
      text: EvaluationSubstitutionType.TEMPLATE,
      tooltip: EvaluationSubstitutionType.TEMPLATE,
      googleRecaptchaKey: EvaluationSubstitutionType.TEMPLATE,
      recaptchaType: EvaluationSubstitutionType.TEMPLATE,
      isVisible: EvaluationSubstitutionType.TEMPLATE,
      isDisabled: EvaluationSubstitutionType.TEMPLATE,
      animateLoading: EvaluationSubstitutionType.TEMPLATE,
      buttonVariant: EvaluationSubstitutionType.TEMPLATE,
      placement: EvaluationSubstitutionType.TEMPLATE,
    },
    triggerPaths: {
      onClick: true,
    },
    validationPaths: {
      text: {
        type: "TEXT",
      },
      tooltip: {
        type: "TEXT",
      },
      googleRecaptchaKey: {
        type: "TEXT",
      },
      recaptchaType: {
        type: "TEXT",
        params: {
          allowedValues: ["V3", "V2"],
          default: "V3",
        },
      },
      isVisible: {
        type: "BOOLEAN",
      },
      isDisabled: {
        type: "BOOLEAN",
      },
      animateLoading: {
        type: "BOOLEAN",
      },
      buttonVariant: {
        type: "TEXT",
        params: {
          allowedValues: ["PRIMARY", "SECONDARY", "TERTIARY"],
          default: "PRIMARY",
        },
      },
      placement: {
        type: "TEXT",
        params: {
          allowedValues: ["START", "BETWEEN", "CENTER"],
          default: "CENTER",
        },
      },
    },
    ENTITY_TYPE: ENTITY_TYPE.WIDGET,
    privateWidgets: {},
  },
  Button2: {
    widgetName: "Button2",
    buttonColor: "#03B365",
    displayName: "Button",
    iconSVG: "/static/media/icon.cca02633.svg",
    topRow: 25,
    bottomRow: 29,
    parentRowSpace: 10,
    type: "BUTTON_WIDGET",
    hideCard: false,
    animateLoading: true,
    parentColumnSpace: 26.421875,
    dynamicTriggerPathList: [],
    leftColumn: 20,
    dynamicBindingPathList: [
      {
        key: "text",
      },
    ],
    text: "{{Button1.text}}",
    isDisabled: false,
    key: "r6h8y6dc8i",
    rightColumn: 36,
    isDefaultClickDisabled: true,
    widgetId: "l0yem4eh6l",
    isVisible: true,
    recaptchaType: "V3",
    version: 1,
    parentId: "0",
    renderMode: "CANVAS",
    isLoading: false,
    buttonVariant: "PRIMARY",
    placement: "CENTER",
    defaultProps: {},
    defaultMetaProps: ["recaptchaToken"],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    reactivePaths: {
      recaptchaToken: EvaluationSubstitutionType.TEMPLATE,
      text: EvaluationSubstitutionType.TEMPLATE,
      tooltip: EvaluationSubstitutionType.TEMPLATE,
      googleRecaptchaKey: EvaluationSubstitutionType.TEMPLATE,
      recaptchaType: EvaluationSubstitutionType.TEMPLATE,
      isVisible: EvaluationSubstitutionType.TEMPLATE,
      isDisabled: EvaluationSubstitutionType.TEMPLATE,
      animateLoading: EvaluationSubstitutionType.TEMPLATE,
      buttonVariant: EvaluationSubstitutionType.TEMPLATE,
      placement: EvaluationSubstitutionType.TEMPLATE,
    },
    triggerPaths: {
      onClick: true,
    },
    validationPaths: {
      text: {
        type: "TEXT",
      },
      tooltip: {
        type: "TEXT",
      },
      googleRecaptchaKey: {
        type: "TEXT",
      },
      recaptchaType: {
        type: "TEXT",
        params: {
          allowedValues: ["V3", "V2"],
          default: "V3",
        },
      },
      isVisible: {
        type: "BOOLEAN",
      },
      isDisabled: {
        type: "BOOLEAN",
      },
      animateLoading: {
        type: "BOOLEAN",
      },
      buttonVariant: {
        type: "TEXT",
        params: {
          allowedValues: ["PRIMARY", "SECONDARY", "TERTIARY"],
          default: "PRIMARY",
        },
      },
      placement: {
        type: "TEXT",
        params: {
          allowedValues: ["START", "BETWEEN", "CENTER"],
          default: "CENTER",
        },
      },
    },
    ENTITY_TYPE: ENTITY_TYPE.WIDGET,
    privateWidgets: {},
  },
  appsmith: {
    user: {
      email: "rathod@appsmith.com",
      workspaceIds: [
        "6218a61972ccd9145ec78c57",
        "621913df0276eb01d22fec44",
        "60caf8edb1e47a1315f0c48f",
        "609114fe05c4d35a9f6cbbf2",
      ],
      username: "rathod@appsmith.com",
      name: "Rishabh",
      commentOnboardingState: "RESOLVED",
      role: "engineer",
      useCase: "personal project",
      enableTelemetry: false,
      emptyInstance: false,
      accountNonExpired: true,
      accountNonLocked: true,
      credentialsNonExpired: true,
      isAnonymous: false,
      isEnabled: true,
      isSuperUser: false,
      isConfigurable: true,
    },
    URL: {
      fullPath:
        "https://dev.appsmith.com/applications/6200d1a2b5bfc0392b959cab/pages/6220c268c48234070f8ac65a/edit?a=b",
      host: "dev.appsmith.com",
      hostname: "dev.appsmith.com",
      queryParams: {
        a: "b",
      },
      protocol: "https:",
      pathname:
        "/applications/6200d1a2b5bfc0392b959cab/pages/6220c268c48234070f8ac65a/edit",
      port: "",
      hash: "",
    },
    store: {
      textColor: "#DF7E65",
    },
    geolocation: {
      canBeRequested: true,
    },
    mode: "EDIT",
    ENTITY_TYPE: ENTITY_TYPE.APPSMITH,
  },
};

export const asyncTagUnevalTree: DataTree = {
  Api1: {
    run: {},
    clear: {},
    actionId: "6279ff0c0b47255c280c4631",
    name: "Api1",
    pluginId: "5ca385dc81b37f0004b4db85",
    pluginType: PluginType.API,
    config: {
      timeoutInMillisecond: 10000,
      paginationType: PaginationType.NONE,
      path: "/echo/get",
      queryParameters: [],
      pluginSpecifiedTemplates: [
        {
          value: true,
        },
      ],
      formData: {
        apiContentType: "none",
      },
    },
    dynamicBindingPathList: [],
    data: {
      args: {},
      url: "https://mock-api.appsmith.com/echo/get",
      headers: {
        accept: "*/*",
        authorization: "Basic dGVzdDo=",
        "cloudfront-forwarded-proto": "https",
        "cloudfront-is-desktop-viewer": "true",
        "cloudfront-is-mobile-viewer": "false",
        "cloudfront-is-smarttv-viewer": "false",
        "cloudfront-is-tablet-viewer": "false",
        "cloudfront-viewer-country": "US",
        host: "mock-api.appsmith.com",
        test: "val",
        "user-agent": "ReactorNetty/1.0.15",
        via: "1.1 290e11478c5b9149e389233998147082.cloudfront.net (CloudFront)",
        "x-amz-cf-id":
          "xKBvLoL6ObBLGeqyky6ZuXl2I9ZgQu58BKzcYvR5VDgDdKgCexv8Zg==",
        "x-amzn-trace-id": "Root=1-627ba66a-2f010d2a5dcfb14009419780",
        "x-forwarded-for": "18.223.74.85, 64.252.147.156",
        "x-forwarded-port": "443",
        "x-forwarded-proto": "https",
        "x-request-id": "2c751e3c-7d54-4f08-908a-a9c909d4f12b",
        "content-length": 0,
      },
    },
    responseMeta: {
      statusCode: "200 OK",
      isExecutionSuccess: true,
      headers: {
        "Content-Type": ["application/json; charset=utf-8"],
        Connection: ["keep-alive"],
        Date: ["Wed, 11 May 2022 12:04:58 GMT"],
        "x-amzn-RequestId": ["2c751e3c-7d54-4f08-908a-a9c909d4f12b"],
        "x-amzn-Remapped-content-length": ["802"],
        "x-amz-apigw-id": ["R9bwsHujiYcF0IQ="],
        etag: ['W/"322-KKw8fZnypLi/dqYHfS13soe8o2s"'],
        "x-powered-by": ["Express"],
        "X-Amzn-Trace-Id": [
          "Root=1-627ba66a-2f010d2a5dcfb14009419780;Sampled=0",
        ],
        "X-Cache": ["Miss from cloudfront"],
        Via: [
          "1.1 290e11478c5b9149e389233998147082.cloudfront.net (CloudFront)",
        ],
        "X-Amz-Cf-Pop": ["YTO50-C1"],
        "X-Amz-Cf-Id": [
          "xKBvLoL6ObBLGeqyky6ZuXl2I9ZgQu58BKzcYvR5VDgDdKgCexv8Zg==",
        ],
        "content-length": ["802"],
        "X-APPSMITH-DATATYPE": ["JSON"],
      },
    },
    ENTITY_TYPE: ENTITY_TYPE.ACTION,
    isLoading: false,
    bindingPaths: {
      "config.path": EvaluationSubstitutionType.TEMPLATE,
      "config.body": EvaluationSubstitutionType.SMART_SUBSTITUTE,
    },
    reactivePaths: {
      data: EvaluationSubstitutionType.TEMPLATE,
      isLoading: EvaluationSubstitutionType.TEMPLATE,
      datasourceUrl: EvaluationSubstitutionType.TEMPLATE,
      "config.path": EvaluationSubstitutionType.TEMPLATE,
      "config.body": EvaluationSubstitutionType.SMART_SUBSTITUTE,
    },
    dependencyMap: {
      "config.body": ["config.pluginSpecifiedTemplates[0].value"],
    },
    logBlackList: {},
    datasourceUrl: "",
  },
  JSObject1: {
    name: "JSObject1",
    actionId: "627217a38a368d6f1efcd0d8",
    pluginType: PluginType.JS,
    ENTITY_TYPE: ENTITY_TYPE.JSACTION,
    body:
      "export default { \n\tmyFun1: () => {\n\t\treturn JSObject2.callApi();\n\t},\n}",
    meta: {
      myFun1: {
        arguments: [],
        isAsync: false,
        confirmBeforeExecute: false,
      },
    },
    bindingPaths: {
      body: EvaluationSubstitutionType.SMART_SUBSTITUTE,
      myFun1: EvaluationSubstitutionType.SMART_SUBSTITUTE,
    },
    reactivePaths: {
      body: EvaluationSubstitutionType.SMART_SUBSTITUTE,
      myFun1: EvaluationSubstitutionType.SMART_SUBSTITUTE,
    },
    dynamicBindingPathList: [
      {
        key: "body",
      },
      {
        key: "myFun1",
      },
    ],
    variables: [],
    dependencyMap: {
      body: ["myFun1"],
    },
    myFun1: {
      data: {},
    },
  },
  JSObject2: {
    name: "JSObject2",
    actionId: "627babc60b47255c28138865",
    pluginType: PluginType.JS,
    ENTITY_TYPE: ENTITY_TYPE.JSACTION,
    body:
      "export default {\n\tcallApi: () => {\n\t\treturn Api1.run()\n\t},\n}",
    meta: {
      callApi: {
        arguments: [],
        isAsync: false,
        confirmBeforeExecute: false,
      },
    },
    bindingPaths: {
      body: EvaluationSubstitutionType.SMART_SUBSTITUTE,
      callApi: EvaluationSubstitutionType.SMART_SUBSTITUTE,
    },
    reactivePaths: {
      body: EvaluationSubstitutionType.SMART_SUBSTITUTE,
      callApi: EvaluationSubstitutionType.SMART_SUBSTITUTE,
    },
    dynamicBindingPathList: [
      {
        key: "body",
      },
      {
        key: "callApi",
      },
    ],
    variables: [],
    dependencyMap: {
      body: ["callApi"],
    },
    callApi: {
      data: {},
    },
  },
  MainContainer: ({
    widgetName: "MainContainer",
    backgroundColor: "none",
    rightColumn: 4896,
    snapColumns: 64,
    detachFromLayout: true,
    widgetId: "0",
    topRow: 0,
    bottomRow: 1320,
    containerStyle: "none",
    snapRows: 125,
    parentRowSpace: 1,
    type: "CANVAS_WIDGET",
    canExtend: true,
    version: 57,
    minHeight: 1292,
    parentColumnSpace: 1,
    dynamicBindingPathList: [],
    leftColumn: 0,
    children: [],
    defaultProps: {},
    defaultMetaProps: [],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    bindingPaths: {},
    reactivePaths: {},
    triggerPaths: {},
    validationPaths: {},
    ENTITY_TYPE: ENTITY_TYPE.WIDGET,
    privateWidgets: {},
  } as unknown) as DataTreeWidget,
  appsmith: ({
    user: {
      email: "anand@appsmith.com",
      workspaceIds: [
        "61431979a67ce2289d3c7c6d",
        "61431a95a67ce2289d3c7c74",
        "5f7add8687af934ed846dd6a",
        "5f9fd13993794869fdbb8dcb",
        "618b5af5da7cd651ee273112",
        "604ef1c5c046f668d7bcc051",
        "61b3389cd3e4214454c26bd1",
        "61b3389cd3e4214454c26bd2",
        "620a0d896b4b1e154a3c057a",
        "620b37296b4b1e154a3c1fd7",
        "60c1a5273535574772b6377b",
        "6066e71a034ece74b1481ad2",
        "623b36e34d9aea1b062b15b3",
        "623b37de4d9aea1b062b170f",
        "624fe51b457aa64da9e02ed3",
        "6176537b515e45415cc7fd15",
        "6206486d6b4b1e154a3be208",
      ],
      username: "anand@appsmith.com",
      name: "Anand Srinivasan",
      enableTelemetry: true,
      idToken: {
        sub: "109879730040206968321",
        email_verified: true,
        name: "Anand Srinivasan",
        given_name: "Anand",
        locale: "en",
        hd: "appsmith.com",
        family_name: "Srinivasan",
        picture:
          "https://lh3.googleusercontent.com/a-/AOh14Gi4HfYY0sKhaG93YAHB_E5-dL4BkFxdf8ZfQ2w7=s96-c",
        email: "anand@appsmith.com",
      },
      accountNonExpired: true,
      accountNonLocked: true,
      credentialsNonExpired: true,
      emptyInstance: false,
      isAnonymous: false,
      isEnabled: true,
      isSuperUser: false,
      isConfigurable: true,
    },
    URL: {
      fullPath:
        "https://app.appsmith.com/app/untitled-application-25/page1-6272179d8a368d6f1efcd0d2/edit",
      host: "app.appsmith.com",
      hostname: "app.appsmith.com",
      queryParams: {},
      protocol: "https:",
      pathname:
        "/app/untitled-application-25/page1-6272179d8a368d6f1efcd0d2/edit",
      port: "",
      hash: "",
    },
    store: {},
    geolocation: {
      canBeRequested: true,
    },
    mode: "EDIT",
    ENTITY_TYPE: ENTITY_TYPE.APPSMITH,
  } as unknown) as DataTreeAppsmith,
};

export const lintingUnEvalTree = {
  Api2: {
    run: {},
    clear: {},
    actionId: "62c46f53f184187f8821534c",
    name: "Api2",
    pluginId: "5ca385dc81b37f0004b4db85",
    pluginType: "API",
    config: {
      timeoutInMillisecond: 10000,
      paginationType: "NONE",
      headers: [
        {
          key: "",
          value: "",
        },
        {
          key: "",
          value: "",
        },
      ],
      encodeParamsToggle: true,
      queryParameters: [
        {
          key: "",
          value: "",
        },
        {
          key: "",
          value: "",
        },
      ],
      body: "",
      bodyFormData: [],
      httpMethod: "GET",
      pluginSpecifiedTemplates: [
        {
          value: true,
        },
      ],
      formData: {
        apiContentType: "none",
      },
    },
    dynamicBindingPathList: [],
    responseMeta: {
      isExecutionSuccess: false,
    },
    ENTITY_TYPE: "ACTION",
    isLoading: false,
    bindingPaths: {
      "config.path": "TEMPLATE",
      "config.body": "SMART_SUBSTITUTE",
      "config.queryParameters[0].key": "TEMPLATE",
      "config.queryParameters[0].value": "TEMPLATE",
      "config.queryParameters[1].key": "TEMPLATE",
      "config.queryParameters[1].value": "TEMPLATE",
      "config.headers[0].key": "TEMPLATE",
      "config.headers[0].value": "TEMPLATE",
      "config.headers[1].key": "TEMPLATE",
      "config.headers[1].value": "TEMPLATE",
    },
    reactivePaths: {
      data: "TEMPLATE",
      isLoading: "TEMPLATE",
      datasourceUrl: "TEMPLATE",
      "config.path": "TEMPLATE",
      "config.body": "SMART_SUBSTITUTE",
      "config.queryParameters[0].key": "TEMPLATE",
      "config.queryParameters[0].value": "TEMPLATE",
      "config.queryParameters[1].key": "TEMPLATE",
      "config.queryParameters[1].value": "TEMPLATE",
      "config.headers[0].key": "TEMPLATE",
      "config.headers[0].value": "TEMPLATE",
      "config.headers[1].key": "TEMPLATE",
      "config.headers[1].value": "TEMPLATE",
    },
    dependencyMap: {
      "config.body": ["config.pluginSpecifiedTemplates[0].value"],
    },
    logBlackList: {},
    datasourceUrl: "",
  },
  Api1: {
    run: {},
    clear: {},
    actionId: "62c48ef99ad402215f5226a4",
    name: "Api1",
    pluginId: "5ca385dc81b37f0004b4db85",
    pluginType: "API",
    config: {
      timeoutInMillisecond: 10000,
      paginationType: "NONE",
      headers: [
        {
          key: "",
          value: "",
        },
        {
          key: "",
          value: "",
        },
      ],
      encodeParamsToggle: true,
      queryParameters: [
        {
          key: "",
          value: "",
        },
        {
          key: "",
          value: "",
        },
      ],
      body: "",
      bodyFormData: [],
      httpMethod: "GET",
      pluginSpecifiedTemplates: [
        {
          value: true,
        },
      ],
      formData: {
        apiContentType: "none",
      },
    },
    dynamicBindingPathList: [],
    responseMeta: {
      isExecutionSuccess: false,
    },
    ENTITY_TYPE: "ACTION",
    isLoading: false,
    bindingPaths: {
      "config.path": "TEMPLATE",
      "config.body": "SMART_SUBSTITUTE",
      "config.queryParameters[0].key": "TEMPLATE",
      "config.queryParameters[0].value": "TEMPLATE",
      "config.queryParameters[1].key": "TEMPLATE",
      "config.queryParameters[1].value": "TEMPLATE",
      "config.headers[0].key": "TEMPLATE",
      "config.headers[0].value": "TEMPLATE",
      "config.headers[1].key": "TEMPLATE",
      "config.headers[1].value": "TEMPLATE",
    },
    reactivePaths: {
      data: "TEMPLATE",
      isLoading: "TEMPLATE",
      datasourceUrl: "TEMPLATE",
      "config.path": "TEMPLATE",
      "config.body": "SMART_SUBSTITUTE",
      "config.queryParameters[0].key": "TEMPLATE",
      "config.queryParameters[0].value": "TEMPLATE",
      "config.queryParameters[1].key": "TEMPLATE",
      "config.queryParameters[1].value": "TEMPLATE",
      "config.headers[0].key": "TEMPLATE",
      "config.headers[0].value": "TEMPLATE",
      "config.headers[1].key": "TEMPLATE",
      "config.headers[1].value": "TEMPLATE",
    },
    dependencyMap: {
      "config.body": ["config.pluginSpecifiedTemplates[0].value"],
    },
    logBlackList: {},
    datasourceUrl: "",
  },
  JSObject1: {
    myVar1: "[]",
    myVar2: "{}",
    name: "JSObject1",
    actionId: "62bf37a0152a750d0c550d7c",
    pluginType: "JS",
    ENTITY_TYPE: "JSACTION",
    body:
      'export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\tmyFun1: async () => {\n\t\t//write code here\n\tawait storeValue("name", "name", false).then(()=>{})\n\t\treturn resetWidget("Button2").then(()=>{})\n\t},\n\tmyFun2: async () => {\n\t\t//use async-await or promises\n\t AbsentEntity.run()}\n}',
    meta: {
      myFun2: {
        arguments: [],
        isAsync: true,
        confirmBeforeExecute: false,
      },
      myFun1: {
        arguments: [],
        isAsync: true,
        confirmBeforeExecute: false,
      },
    },
    bindingPaths: {
      body: "SMART_SUBSTITUTE",
      myVar1: "SMART_SUBSTITUTE",
      myVar2: "SMART_SUBSTITUTE",
      myFun2: "SMART_SUBSTITUTE",
      myFun1: "SMART_SUBSTITUTE",
    },
    reactivePaths: {
      body: "SMART_SUBSTITUTE",
      myVar1: "SMART_SUBSTITUTE",
      myVar2: "SMART_SUBSTITUTE",
      myFun2: "SMART_SUBSTITUTE",
      myFun1: "SMART_SUBSTITUTE",
    },
    dynamicBindingPathList: [
      {
        key: "body",
      },
      {
        key: "myVar1",
      },
      {
        key: "myVar2",
      },
      {
        key: "myFun2",
      },
      {
        key: "myFun1",
      },
    ],
    variables: ["myVar1", "myVar2"],
    dependencyMap: {
      body: ["myFun2", "myFun1"],
    },
    myFun2: {
      data: {},
    },
    myFun1: {
      data: {},
    },
  },
  MainContainer: {
    widgetName: "MainContainer",
    backgroundColor: "none",
    rightColumn: 4896,
    snapColumns: 64,
    detachFromLayout: true,
    widgetId: "0",
    topRow: 0,
    bottomRow: 1320,
    containerStyle: "none",
    snapRows: 125,
    parentRowSpace: 1,
    type: "CANVAS_WIDGET",
    canExtend: true,
    version: 59,
    minHeight: 1292,
    dynamicTriggerPathList: [],
    parentColumnSpace: 1,
    dynamicBindingPathList: [],
    leftColumn: 0,
    children: ["qkqk9ezxvg", "vujfz3klqc"],
    defaultProps: {},
    defaultMetaProps: [],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    bindingPaths: {},
    reactivePaths: {},
    triggerPaths: {},
    validationPaths: {},
    ENTITY_TYPE: "WIDGET",
    privateWidgets: {},
  },
  Button3: {
    boxShadow: "none",
    widgetName: "Button3",
    onClick:
      '{{Api1.run().then(()=>{\n\tconst name = Button2.text;\n\tstoreValue("name",name,false)\nApi2.run()\n})}}',
    buttonColor: "{{appsmith.theme.colors.primaryColor}}",
    dynamicPropertyPathList: [
      {
        key: "onClick",
      },
    ],
    displayName: "Button",
    iconSVG: "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",
    searchTags: ["click", "submit"],
    topRow: 16,
    bottomRow: 20,
    parentRowSpace: 10,
    type: "BUTTON_WIDGET",
    hideCard: false,
    animateLoading: true,
    parentColumnSpace: 14.0625,
    dynamicTriggerPathList: [
      {
        key: "onClick",
      },
    ],
    leftColumn: 18,
    dynamicBindingPathList: [
      {
        key: "buttonColor",
      },
      {
        key: "borderRadius",
      },
    ],
    text: "",
    isDisabled: false,
    key: "enfgkhlzev",
    isDeprecated: false,
    rightColumn: 34,
    isDefaultClickDisabled: true,
    widgetId: "qkqk9ezxvg",
    isVisible: true,
    recaptchaType: "V3",
    version: 1,
    parentId: "0",
    renderMode: "CANVAS",
    isLoading: false,
    borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
    buttonVariant: "PRIMARY",
    placement: "CENTER",
    defaultProps: {},
    defaultMetaProps: ["recaptchaToken"],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    bindingPaths: {
      text: "TEMPLATE",
      tooltip: "TEMPLATE",
      googleRecaptchaKey: "TEMPLATE",
      recaptchaType: "TEMPLATE",
      isVisible: "TEMPLATE",
      isDisabled: "TEMPLATE",
      animateLoading: "TEMPLATE",
      buttonColor: "TEMPLATE",
      buttonVariant: "TEMPLATE",
      borderRadius: "TEMPLATE",
      boxShadow: "TEMPLATE",
      placement: "TEMPLATE",
    },
    reactivePaths: {
      recaptchaToken: "TEMPLATE",
      buttonColor: "TEMPLATE",
      borderRadius: "TEMPLATE",
      text: "TEMPLATE",
      tooltip: "TEMPLATE",
      googleRecaptchaKey: "TEMPLATE",
      recaptchaType: "TEMPLATE",
      isVisible: "TEMPLATE",
      isDisabled: "TEMPLATE",
      animateLoading: "TEMPLATE",
      buttonVariant: "TEMPLATE",
      boxShadow: "TEMPLATE",
      placement: "TEMPLATE",
    },
    triggerPaths: {
      onClick: true,
    },
    validationPaths: {
      text: {
        type: "TEXT",
      },
      tooltip: {
        type: "TEXT",
      },
      googleRecaptchaKey: {
        type: "TEXT",
      },
      recaptchaType: {
        type: "TEXT",
        params: {
          allowedValues: ["V3", "V2"],
          default: "V3",
        },
      },
      isVisible: {
        type: "BOOLEAN",
      },
      isDisabled: {
        type: "BOOLEAN",
      },
      animateLoading: {
        type: "BOOLEAN",
      },
      buttonColor: {
        type: "TEXT",
      },
      buttonVariant: {
        type: "TEXT",
        params: {
          allowedValues: ["PRIMARY", "SECONDARY", "TERTIARY"],
          default: "PRIMARY",
        },
      },
      borderRadius: {
        type: "TEXT",
      },
      boxShadow: {
        type: "TEXT",
      },
      placement: {
        type: "TEXT",
        params: {
          allowedValues: ["START", "BETWEEN", "CENTER"],
          default: "CENTER",
        },
      },
    },
    ENTITY_TYPE: "WIDGET",
    privateWidgets: {},
  },
  Button2: {
    boxShadow: "none",
    widgetName: "Button2",
    onClick: "{{Api2.run(); AbsentEntity.run()}}",
    buttonColor: "{{appsmith.theme.colors.primaryColor}}",
    dynamicPropertyPathList: [
      {
        key: "onClick",
      },
    ],
    displayName: "Button",
    iconSVG: "/static/media/icon.cca026338f1c8eb6df8ba03d084c2fca.svg",
    searchTags: ["click", "submit"],
    topRow: 7,
    bottomRow: 11,
    parentRowSpace: 10,
    type: "BUTTON_WIDGET",
    hideCard: false,
    animateLoading: true,
    parentColumnSpace: 14.0625,
    dynamicTriggerPathList: [
      {
        key: "onClick",
      },
    ],
    leftColumn: 20,
    dynamicBindingPathList: [
      {
        key: "buttonColor",
      },
      {
        key: "borderRadius",
      },
    ],
    text: "Submit",
    isDisabled: false,
    key: "y7ypmprlbw",
    isDeprecated: false,
    rightColumn: 36,
    isDefaultClickDisabled: true,
    widgetId: "vujfz3klqc",
    isVisible: true,
    recaptchaType: "V3",
    version: 1,
    parentId: "0",
    renderMode: "CANVAS",
    isLoading: false,
    borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
    buttonVariant: "PRIMARY",
    placement: "CENTER",
    defaultProps: {},
    defaultMetaProps: ["recaptchaToken"],
    logBlackList: {},
    meta: {},
    propertyOverrideDependency: {},
    overridingPropertyPaths: {},
    bindingPaths: {
      text: "TEMPLATE",
      tooltip: "TEMPLATE",
      googleRecaptchaKey: "TEMPLATE",
      recaptchaType: "TEMPLATE",
      isVisible: "TEMPLATE",
      isDisabled: "TEMPLATE",
      animateLoading: "TEMPLATE",
      buttonColor: "TEMPLATE",
      buttonVariant: "TEMPLATE",
      borderRadius: "TEMPLATE",
      boxShadow: "TEMPLATE",
      placement: "TEMPLATE",
    },
    reactivePaths: {
      recaptchaToken: "TEMPLATE",
      buttonColor: "TEMPLATE",
      borderRadius: "TEMPLATE",
      text: "TEMPLATE",
      tooltip: "TEMPLATE",
      googleRecaptchaKey: "TEMPLATE",
      recaptchaType: "TEMPLATE",
      isVisible: "TEMPLATE",
      isDisabled: "TEMPLATE",
      animateLoading: "TEMPLATE",
      buttonVariant: "TEMPLATE",
      boxShadow: "TEMPLATE",
      placement: "TEMPLATE",
    },
    triggerPaths: {
      onClick: true,
    },
    validationPaths: {
      text: {
        type: "TEXT",
      },
      tooltip: {
        type: "TEXT",
      },
      googleRecaptchaKey: {
        type: "TEXT",
      },
      recaptchaType: {
        type: "TEXT",
        params: {
          allowedValues: ["V3", "V2"],
          default: "V3",
        },
      },
      isVisible: {
        type: "BOOLEAN",
      },
      isDisabled: {
        type: "BOOLEAN",
      },
      animateLoading: {
        type: "BOOLEAN",
      },
      buttonColor: {
        type: "TEXT",
      },
      buttonVariant: {
        type: "TEXT",
        params: {
          allowedValues: ["PRIMARY", "SECONDARY", "TERTIARY"],
          default: "PRIMARY",
        },
      },
      borderRadius: {
        type: "TEXT",
      },
      boxShadow: {
        type: "TEXT",
      },
      placement: {
        type: "TEXT",
        params: {
          allowedValues: ["START", "BETWEEN", "CENTER"],
          default: "CENTER",
        },
      },
    },
    ENTITY_TYPE: "WIDGET",
    privateWidgets: {},
  },
  appsmith: {
    user: {
      email: "favour@appsmith.com",
      workspaceIds: [
        "61800c6bd504bf710747bf9a",
        "611cc2ef3d948934dbbc5104",
        "614af70372ee9c49524cd793",
        "61ade7e80fb46954df14350e",
        "61bc27d8fb2237737d467478",
        "60caf8edb1e47a1315f0c48f",
        "61dd414c839ff840051e8aa2",
        "61e52bb4847aa804d79fc7c1",
        "622ec8269e1e1e2f7a01b3f7",
        "61f6cbdd12bf99332041ec0d",
        "6256c41cf397f211149d639a",
        "623dae666c86dd5be6fdcdda",
        "62702ec8afffd379fcf0d2a7",
        "61dbc20d2ea8550d00e65f36",
        "623dadd86c86dd5be6fdcdd3",
        "6171a062b7de236aa183ee0e",
      ],
      username: "favour@appsmith.com",
      name: "Favour Ohanekwu",
      commentOnboardingState: "RESOLVED",
      photoId: "62a9638d1f0a8d5a04ee6d78",
      enableTelemetry: true,
      emptyInstance: false,
      accountNonExpired: true,
      accountNonLocked: true,
      credentialsNonExpired: true,
      isAnonymous: false,
      isEnabled: true,
      isSuperUser: false,
      isConfigurable: true,
    },
    URL: {
      fullPath:
        "https://dev.appsmith.com/app/untitled-application-1/page1-62bf3730174c17103179d18c/edit",
      host: "dev.appsmith.com",
      hostname: "dev.appsmith.com",
      queryParams: {},
      protocol: "https:",
      pathname:
        "/app/untitled-application-1/page1-62bf3730174c17103179d18c/edit",
      port: "",
      hash: "",
    },
    store: {},
    geolocation: {
      canBeRequested: true,
    },
    mode: "EDIT",
    theme: {
      colors: {
        primaryColor: "#553DE9",
        backgroundColor: "#F8FAFC",
      },
      borderRadius: {
        appBorderRadius: "0.375rem",
      },
      boxShadow: {
        appBoxShadow:
          "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
      },
      fontFamily: {
        appFont: "Nunito Sans",
      },
    },
    ENTITY_TYPE: "APPSMITH",
  },
};

export const unEvalTreeWidgetSelectWidget = {
  ...unEvalTree,
  Select2: {
    boxShadow: "none",
    widgetName: "Select2",
    isFilterable: true,
    displayName: "Select",
    iconSVG: "/static/media/icon.bd99caba5853ad71e4b3d8daffacb3a2.svg",
    labelText: "Label",
    searchTags: ["dropdown"],
    topRow: 7,
    bottomRow: 11,
    parentRowSpace: 10,
    labelWidth: 5,
    type: "SELECT_WIDGET",
    serverSideFiltering: false,
    hideCard: false,
    defaultOptionValue: "",
    animateLoading: true,
    parentColumnSpace: 15.0625,
    dynamicTriggerPathList: [],
    leftColumn: 24,
    dynamicBindingPathList: [
      {
        key: "accentColor",
      },
      {
        key: "borderRadius",
      },
      {
        key: "isValid",
      },
      {
        key: "selectedOptionValue",
      },
      {
        key: "selectedOptionLabel",
      },
    ],
    labelPosition: "Left",
    options:
      '[\n  {\n    "label": "Blue",\n    "value": "BLUE"\n  },\n  {\n    "label": "Green",\n    "value": "GREEN"\n  },\n  {\n    "label": "Red",\n    "value": "RED"\n  }\n]',
    placeholderText: "Select option",
    isDisabled: false,
    key: "od4dcrgp5p",
    labelTextSize: "0.875rem",
    isRequired: false,
    isDeprecated: false,
    rightColumn: 44,
    widgetId: "kqre06w7ev",
    accentColor: "{{appsmith.theme.colors.primaryColor}}",
    isVisible: true,
    version: 1,
    parentId: "0",
    labelAlignment: "left",
    renderMode: "CANVAS",
    isLoading: false,
    borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
    isValid:
      '{{(()=>{return Select2.isRequired      ? !_.isNil(Select2.selectedOptionValue) && Select2.selectedOptionValue !== ""      : true;})()}}',
    selectedOptionValue:
      '{{(()=>{const isServerSideFiltered = Select2.serverSideFiltering;    const options = Select2.options ?? [];    let value = Select2.value?.value ?? Select2.value;    const valueIndex = _.findIndex(options, (option) => option.value === value);    if (valueIndex === -1) {      if (!isServerSideFiltered) {        value = "";      }      if (        isServerSideFiltered &&        !_.isPlainObject(Select2.value) &&        !Select2.isDirty      ) {        value = "";      }    }    return value;})()}}',
    selectedOptionLabel:
      '{{(()=>{const isServerSideFiltered = Select2.serverSideFiltering;    const options = Select2.options ?? [];    let label = Select2.label?.label ?? Select2.label;    const labelIndex = _.findIndex(      options,      (option) =>        option.label === label && option.value === Select2.selectedOptionValue,    );    if (labelIndex === -1) {      if (        !_.isNil(Select2.selectedOptionValue) &&        Select2.selectedOptionValue !== ""      ) {        const selectedOption = _.find(          options,          (option) => option.value === Select2.selectedOptionValue,        );        if (selectedOption) {          label = selectedOption.label;        }      } else {        if (          !isServerSideFiltered ||          (isServerSideFiltered && Select2.selectedOptionValue === "")        ) {          label = "";        }      }    }    return label;})()}}',
    defaultProps: {
      value: "defaultOptionValue",
      label: "defaultOptionValue",
      filterText: "",
    },
    defaultMetaProps: ["value", "label", "filterText", "isDirty"],
    logBlackList: {
      isValid: true,
      selectedOptionValue: true,
      selectedOptionLabel: true,
    },
    meta: {
      filterText: "",
    },
    propertyOverrideDependency: {
      value: {
        DEFAULT: "defaultOptionValue",
        META: "meta.value",
      },
      label: {
        DEFAULT: "defaultOptionValue",
        META: "meta.label",
      },
      filterText: {
        DEFAULT: "",
        META: "meta.filterText",
      },
    },
    overridingPropertyPaths: {
      defaultOptionValue: ["value", "meta.value", "label", "meta.label"],
      "meta.value": ["value"],
      "meta.label": ["label"],
      "": ["filterText"],
      "meta.filterText": ["filterText"],
    },
    bindingPaths: {
      options: "SMART_SUBSTITUTE",
      defaultOptionValue: "TEMPLATE",
      labelText: "TEMPLATE",
      labelWidth: "TEMPLATE",
      isFilterable: "TEMPLATE",
      serverSideFiltering: "TEMPLATE",
      isRequired: "TEMPLATE",
      placeholderText: "TEMPLATE",
      isVisible: "TEMPLATE",
      isDisabled: "TEMPLATE",
      animateLoading: "TEMPLATE",
      labelTextColor: "TEMPLATE",
      labelTextSize: "TEMPLATE",
      labelStyle: "TEMPLATE",
      accentColor: "TEMPLATE",
      borderRadius: "TEMPLATE",
      boxShadow: "TEMPLATE",
    },
    reactivePaths: {
      isValid: "TEMPLATE",
      selectedOptionValue: "TEMPLATE",
      selectedOptionLabel: "TEMPLATE",
      value: "TEMPLATE",
      label: "TEMPLATE",
      filterText: "TEMPLATE",
      isDirty: "TEMPLATE",
      "": "TEMPLATE",
      accentColor: "TEMPLATE",
      borderRadius: "TEMPLATE",
      defaultOptionValue: "TEMPLATE",
      "meta.value": "TEMPLATE",
      "meta.label": "TEMPLATE",
      "meta.filterText": "TEMPLATE",
      options: "SMART_SUBSTITUTE",
      labelText: "TEMPLATE",
      labelWidth: "TEMPLATE",
      isFilterable: "TEMPLATE",
      serverSideFiltering: "TEMPLATE",
      isRequired: "TEMPLATE",
      placeholderText: "TEMPLATE",
      isVisible: "TEMPLATE",
      isDisabled: "TEMPLATE",
      animateLoading: "TEMPLATE",
      labelTextColor: "TEMPLATE",
      labelTextSize: "TEMPLATE",
      labelStyle: "TEMPLATE",
      boxShadow: "TEMPLATE",
    },
    triggerPaths: {
      onOptionChange: true,
    },
    validationPaths: {
      options: {
        type: "ARRAY",
        params: {
          unique: ["value"],
          children: {
            type: "OBJECT",
            params: {
              required: true,
              allowedKeys: [
                {
                  name: "label",
                  type: "TEXT",
                  params: {
                    default: "",
                    requiredKey: true,
                  },
                },
                {
                  name: "value",
                  type: "TEXT",
                  params: {
                    default: "",
                    requiredKey: true,
                  },
                },
              ],
            },
          },
        },
      },
      defaultOptionValue: {
        type: "FUNCTION",
        params: {
          expected: {
            type: 'value1 or { "label": "label1", "value": "value1" }',
            example: 'value1 | { "label": "label1", "value": "value1" }',
            autocompleteDataType: "STRING",
          },
          fnString:
            'function defaultOptionValueValidation(value, props, _) {\n  var isValid;\n  var parsed;\n  var message = "";\n  var isServerSideFiltered = props.serverSideFiltering; // TODO: validation of defaultOption is dependent on serverSideFiltering and options, this property should reValidated once the dependencies change\n  //this issue is been tracked here https://github.com/appsmithorg/appsmith/issues/15303\n\n  var options = props.options;\n  /*\n   * Function to check if the object has `label` and `value`\n   */\n\n  var hasLabelValue = function hasLabelValue(obj) {\n    return _.isPlainObject(value) && obj.hasOwnProperty("label") && obj.hasOwnProperty("value") && _.isString(obj.label) && (_.isString(obj.value) || _.isFinite(obj.value));\n  };\n  /*\n   * When value is "{label: \'green\', value: \'green\'}"\n   */\n\n\n  if (typeof value === "string") {\n    try {\n      var parsedValue = JSON.parse(value);\n\n      if (_.isObject(parsedValue)) {\n        value = parsedValue;\n      }\n    } catch (e) {}\n  }\n\n  if (_.isString(value) || _.isFinite(value) || hasLabelValue(value)) {\n    /*\n     * When value is "", "green", 444, {label: "green", value: "green"}\n     */\n    isValid = true;\n    parsed = value;\n  } else {\n    isValid = false;\n    parsed = undefined;\n    message = \'value does not evaluate to type: string | number | { "label": "label1", "value": "value1" }\';\n  }\n\n  if (isValid && !_.isNil(parsed) && parsed !== "") {\n    if (!Array.isArray(options) && typeof options === "string") {\n      try {\n        var parsedOptions = JSON.parse(options);\n\n        if (Array.isArray(parsedOptions)) {\n          options = parsedOptions;\n        } else {\n          options = [];\n        }\n      } catch (e) {\n        options = [];\n      }\n    }\n\n    var _parsedValue = parsed.hasOwnProperty("value") ? parsed.value : parsed;\n\n    var valueIndex = _.findIndex(options, function (option) {\n      return option.value === _parsedValue;\n    });\n\n    if (valueIndex === -1) {\n      if (!isServerSideFiltered) {\n        isValid = false;\n        message = "Default value is missing in options. Please update the value.";\n      } else {\n        if (!hasLabelValue(parsed)) {\n          isValid = false;\n          message = "Default value is missing in options. Please use {label : <string | num>, value : < string | num>} format to show default for server side data.";\n        }\n      }\n    }\n  }\n\n  return {\n    isValid: isValid,\n    parsed: parsed,\n    messages: [message]\n  };\n}',
        },
        dependentPaths: ["serverSideFiltering", "options"],
      },
      labelText: {
        type: "TEXT",
      },
      labelWidth: {
        type: "NUMBER",
        params: {
          natural: true,
        },
      },
      isFilterable: {
        type: "BOOLEAN",
      },
      serverSideFiltering: {
        type: "BOOLEAN",
      },
      isRequired: {
        type: "BOOLEAN",
      },
      placeholderText: {
        type: "TEXT",
      },
      isVisible: {
        type: "BOOLEAN",
      },
      isDisabled: {
        type: "BOOLEAN",
      },
      animateLoading: {
        type: "BOOLEAN",
      },
      labelTextColor: {
        type: "TEXT",
      },
      labelTextSize: {
        type: "TEXT",
      },
      labelStyle: {
        type: "TEXT",
      },
      accentColor: {
        type: "TEXT",
      },
      borderRadius: {
        type: "TEXT",
      },
      boxShadow: {
        type: "TEXT",
      },
    },
    ENTITY_TYPE: "WIDGET",
    privateWidgets: {},
    filterText: "",
    isDirty: false,
  },
};
